package cn.bisoft.java.bean.entity;

import java.io.Serializable;



/**
 * This is an object that contains data related to the app_user table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="app_user"
 */

public abstract class BaseAppUser  implements Serializable {
	private static final long serialVersionUID = 1L;
	public static String REF = "AppUser";
	public static String PROP_LAST_LOGIN = "last_login";
	public static String PROP_MODIFIED = "modified";
	public static String PROP_EMAIL = "email";
	public static String PROP_CONFIRM_VALUE = "confirm_value";
	public static String PROP_PASSWORD_VALUE = "password_value";
	public static String PROP_USER_ID = "user_id";
	public static String PROP_CREATED = "created";
	public static String PROP_LOGIN_NAME = "login_name";
	public static String PROP_FIRST_NAME = "first_name";
	public static String PROP_LAST_NAME = "last_name";


	// constructors
	public BaseAppUser () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseAppUser (java.lang.Integer user_id) {
		this.setUser_id(user_id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseAppUser (
		java.lang.Integer user_id,
		java.lang.String login_name) {

		this.setUser_id(user_id);
		this.setLogin_name(login_name);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer user_id;

	// fields
	private java.lang.String login_name;
	private java.lang.String first_name;
	private java.lang.String last_name;
	private java.lang.String password_value;
	private java.lang.String email;
	private java.lang.String confirm_value;
	private java.util.Date modified;
	private java.util.Date created;
	private java.util.Date last_login;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="user_id"
     */
	public java.lang.Integer getUser_id () {
		return user_id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param user_id the new ID
	 */
	public void setUser_id (java.lang.Integer user_id) {
		this.user_id = user_id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: login_name
	 */
	public java.lang.String getLogin_name () {
		return login_name;
	}

	/**
	 * Set the value related to the column: login_name
	 * @param login_name the login_name value
	 */
	public void setLogin_name (java.lang.String login_name) {
		this.login_name = login_name;
	}



	/**
	 * Return the value associated with the column: first_name
	 */
	public java.lang.String getFirst_name () {
		return first_name;
	}

	/**
	 * Set the value related to the column: first_name
	 * @param first_name the first_name value
	 */
	public void setFirst_name (java.lang.String first_name) {
		this.first_name = first_name;
	}



	/**
	 * Return the value associated with the column: last_name
	 */
	public java.lang.String getLast_name () {
		return last_name;
	}

	/**
	 * Set the value related to the column: last_name
	 * @param last_name the last_name value
	 */
	public void setLast_name (java.lang.String last_name) {
		this.last_name = last_name;
	}



	/**
	 * Return the value associated with the column: password_value
	 */
	public java.lang.String getPassword_value () {
		return password_value;
	}

	/**
	 * Set the value related to the column: password_value
	 * @param password_value the password_value value
	 */
	public void setPassword_value (java.lang.String password_value) {
		this.password_value = password_value;
	}



	/**
	 * Return the value associated with the column: email
	 */
	public java.lang.String getEmail () {
		return email;
	}

	/**
	 * Set the value related to the column: email
	 * @param email the email value
	 */
	public void setEmail (java.lang.String email) {
		this.email = email;
	}



	/**
	 * Return the value associated with the column: confirm_value
	 */
	public java.lang.String getConfirm_value () {
		return confirm_value;
	}

	/**
	 * Set the value related to the column: confirm_value
	 * @param confirm_value the confirm_value value
	 */
	public void setConfirm_value (java.lang.String confirm_value) {
		this.confirm_value = confirm_value;
	}



	/**
	 * Return the value associated with the column: modified
	 */
	public java.util.Date getModified () {
		return modified;
	}

	/**
	 * Set the value related to the column: modified
	 * @param modified the modified value
	 */
	public void setModified (java.util.Date modified) {
		this.modified = modified;
	}



	/**
	 * Return the value associated with the column: created
	 */
	public java.util.Date getCreated () {
		return created;
	}

	/**
	 * Set the value related to the column: created
	 * @param created the created value
	 */
	public void setCreated (java.util.Date created) {
		this.created = created;
	}



	/**
	 * Return the value associated with the column: last_login
	 */
	public java.util.Date getLast_login () {
		return last_login;
	}

	/**
	 * Set the value related to the column: last_login
	 * @param last_login the last_login value
	 */
	public void setLast_login (java.util.Date last_login) {
		this.last_login = last_login;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof AppUser)) return false;
		else {
			AppUser appUser = (AppUser) obj;
			if (null == this.getUser_id() || null == appUser.getUser_id()) return false;
			else return (this.getUser_id().equals(appUser.getUser_id()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getUser_id()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getUser_id().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}